﻿using System.Data;
using System.Data.Objects;

using Sita.Entities;

namespace Sita.Data.Core
{
    public interface IQueryableContext : IContext
    {
        string DefaultContainerName { get; }

        object GetObjectByKey(EntityKey key);

        void SetChanges<TEntity>(TEntity item) where TEntity : class, IObjectWithChangeTracker, new();

        void Attach<TEntity>(TEntity item) where TEntity : class,IObjectWithChangeTracker, new();
        void Dettach<TEntity>(TEntity item) where TEntity : class,IObjectWithChangeTracker, new();

        IObjectSet<TEntity> CreateObjectSet<TEntity>() where TEntity : class,IObjectWithChangeTracker, new();
    }
}
